#pragma once

#include "d3d9.h"
#include "d3dx9.h"
#include "SpriteManager.h"
#include "DirectInput.h"

// Add pragma comments so we do not have to change
// the project dependencies
#pragma comment (lib, "d3d9.lib")
#pragma comment (lib, "d3dx9.lib")

class UIBar
{
private:
	// Singleton instance
	static UIBar*	m_UIBarInstance;

	// Pointer to SpriteManager
	SpriteManager*		m_pSpriteManager;

	// Sprite pointer
	ID3DXSprite*		m_pUIBar;

	// Sprites that are used for the UI Bar
	short sEnergyBar;
	short sButtonX;
	short sShield1;
	short sShield2;
	short sShield3;
	short sMaxSprite;

public:
	UIBar(void);
	~UIBar(void);

	// Sprites that are used for buttons
	short sUIBar;
	short sStraightTrackButton;
	short sCurveTrackButton;
	short sUndo;
	short sUndoAll;
	short sRedOrbButton;
	short sBlueOrbButton;
	short sWhiteOrbButton;
	short sPause;
	short sButtonX1;
	short sButtonX2;
	short sButtonX3;

	static UIBar* GetInstance(void);
	void DeleteUIBarInstance(void);
	void Initialize(void);
	void LoadUIBar(short sShieldLevel);
	void Update(HWND hWnd, DirectInput* m_pDirectInput);
	void Render(void);
	void RenderPause(void);
	void SetSwitchXFlight(void);
	void SetSwitchXBuild(void);
	void DestroyUI(void);
};